<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <script>
      var divs = document.querySelectorAll("div");
      console.log(divs);
      var ary = [...divs]; // 通过运算符 将divs 伪数组转换成数组
      ary.push(1);
      console.log(ary);
    </script>
  </body>
</html>
